<h1>Disciplinas</h1>
<form id="form_disciplina"  
name="form_disciplina" 
action="<?php echo url_for('disciplina/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id_disciplina='.$form->getObject()->getIdDisciplina() : '')) ?>" 
method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>
class="form-horizontal"
>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<input type="hidden" name="id_disciplina" value="<?php echo $form->getObject()->getIdDisciplina() ?>" />
<?php endif; ?>

	<fieldset>
		<legend>Cadastro/edição</legend>
          <div class="control-group">
            <label class="control-label" for="input01"><?php echo $form['nm_disciplina']->renderLabel() ?></label>
            <div class="controls">
              	<?php echo $form['nm_disciplina'] ?>
          		<?php echo form_error('disciplina[nm_disciplina]'); ?>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="input01"><?php echo $form['ds_disciplina']->renderLabel() ?></label>
            <div class="controls">
              <?php echo $form['ds_disciplina'] ?>
         	  <?php echo form_error('disciplina[ds_disciplina]'); ?>
            </div>
          </div>
	</fieldset>
	<?php echo $form->renderHiddenFields() ?>



<?php
	comandos_form(
		link_to(
			':: Voltar ::',
			$sf_context->getModuleName().'/list',
			array('class' => 'btn btn-info')
		),
		'<button type="submit" class="btn btn-info">:: Salvar ::</button>'
	);
?>
</form>


<script>
    $(function()
        {
            System.formdata.save(new Array("msgAlerta", "Atenção:"));
        }
    );
</script>

<?php preenche_mensagem_flash() ?>